
import * as THREE from 'three';
import { Vector3,Camera } from 'three';
import { threeExport } from './threeExport';
interface cameraUtil{
    camera: Camera | undefined,
    cameraFov:number,
    cameraNear:number,
    cameraFar:number,
    cameraPostion:Vector3
}

export const cameraUtil = <cameraUtil> {
    camera: undefined,
    cameraFov:40,
    cameraNear:.1,
    cameraFar:10000,
    cameraPostion:new THREE.Vector3(0,0,0)
}
export function createCamera() {
    cameraUtil.camera = new THREE.PerspectiveCamera(cameraUtil.cameraFov,threeExport.width/threeExport.height,cameraUtil.cameraNear,cameraUtil.cameraFar);
    cameraUtil.camera.position.copy(cameraUtil.cameraPostion)
}